package com.bdqn.mapper;

import com.bdqn.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {
    /**
     * 根据账号密码查询用户
     * @param account
     * @param password
     * @return
     */
    SysUser getAccount(@Param("account")String account, @Param("password")String password);

    int getCount();
    List<SysUser> getUserList(@Param("pageIndex")int pageIndex,@Param("pageSize")int pageSize,@Param("queryRealName") String queryRealName,@Param("queryRoleId") Integer queryRoleId);

    int getPwd(@Param("oldPassword")String oldPassword,@Param("account")String account);


    int savePassword(@Param("account")String account,@Param("pwd")String pwd);

    int del(@Param("id")Integer id);

    int getAccountC(@Param("account") String account);

    /**
     * 保存用户
     * @param sysUser
     * @return
     */
    public boolean add(SysUser sysUser);

    public SysUser getUserById(@Param("roleId") Integer roleId);

    public boolean update(SysUser sysUser);

}
